<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="front" />
<title>退票</title>
<link href="${ctxStatic }/xiake/css/list.css" rel='stylesheet'type='text/css' />
<script type="text/javascript">
	var purchaseTotalNum = ${orders.purchasenum};
	function onsub(){
		var purchasenum = $('#purchasenum').val();
		if(isNaN(purchasenum)){
			alert('退票数非法');
			return;
		} else if(purchasenum <= 0) {
			alert('至少退一张票');
			return;
		} else if(purchasenum >purchaseTotalNum) {
			alert('退票数超过最大订票数');
			return;
		}
		$('#inputForm').submit();
	}
</script>
</head>
<body>
	<div class="container">
		<input type="hidden" id="menuInfo" value="indexRealsche">
		<div class="container_nav font_normal_size">
			霞客约车&gt;<span class="main_color">退票</span>
		</div>
		<form id="inputForm" action="${ctxFront}/realsche/doBackMoney" method="post" class="form-horizontal">
			<input type="hidden" name="orderid" value="${orders.orderid }"/>
			<sys:message content="${message}" />
			<div class="container_information font_normal_size">
				<div>
					<label>联系人姓名</label>
					<input type="text" value="${orders.contacts }" readonly/>
				</div>
				<div>
					<label>手机号</label>
					<input type="text" value="${orders.payertel }" readonly/>
				</div>
				<div>
					<label>退票数（张）</label>
					<input type="number" id="purchasenum" name="purchasenum" value="1">
					<span>共${orders.purchasenum }张</span>
				</div>
			</div>
			<div class="container_submit">
				<div class="container_submit_c font_normal_size">
					<div class="container_submit_b font_normal_size pointer" onclick="onsub();">确认退票</div>
				</div>
			</div>
		</form>
		
	</div>
</body>
</html>